def produce():
    for i in range(3):
        print('produce', i)
        yield i

def covert():
    producer = produce()
    for i in range(3):
        item = next(producer) * 10
        print('  covert', i, '->', item)
        yield item

def consume():
    coverter = covert()
    for i in range(3):
        item = next(coverter)
        print('      consume', item)

consume()
